import { REQUEST_STATUS } from '../lib/enum/STATUS_CODE'
import { ApiResponse } from '../lib/class/Response'

export default {
  getDataSourceType: function () {
    // return { result: [], status: REQUEST_STATUS.REQUEST_ERROR }
    return new ApiResponse(
      [
        {
          index: 1,
          typeCate: 'database',
          typeCateCN: '数据库',
          typeName: 'Hive',
          typeCode: 'hive',
          typeImgUrl: ''
        },
        {
          index: 2,
          typeCate: 'database',
          typeCateCN: '数据库',
          typeName: 'Spark',
          typeCode: 'Spark',
          typeImgUrl: ''
        },
        {
          index: 3,
          typeCate: 'database',
          typeCateCN: '数据库',
          typeName: 'HBase',
          typeCode: 'hbase',
          typeImgUrl: ''
        },
        {
          index: 4,
          typeCate: 'database',
          typeCateCN: '数据库',
          typeName: 'MySQL',
          typeCode: 'mysql',
          typeImgUrl: ''
        },
        {
          index: 5,
          typeCate: 'localfile',
          typeCateCN: '文件',
          typeName: 'Excel',
          typeCode: 'excel',
          typeImgUrl: ''
        },
        {
          index: 6,
          typeCate: 'localfile',
          typeCateCN: '文件',
          typeName: 'CSV',
          typeCode: 'csv',
          typeImgUrl: ''
        }
      ],
      STATUS_CODE.REQUEST_SUCCESS
    )
  },
  getDataSourceList: function () {
    return new ApiResponse([], REQUEST_STATUS.REQUEST_SUCCESS)
  }
}
